package com.vip.shopbase.Enum;

public enum ResultEnum {
    UNKNOW_ERROR(-1,"未知错误"),
    SUCCESS(0,"操作成功"),
    ROOT_ERROR(1,"非法操作，请检查权限"),
    SQL_ERROR(2,"数据库连接异常"),
    LOGIN_ERROR(100,"用户名或密码错误"),
    UNKNOW_USER_ERROR(101,"用户信息未知或不存在"),
    HAS_USER_ERROR(102,"用户已经存在"),
    UNKNOW_COURSE_ERROR(200,"课程信息未知或不存在"),
    HAS_COURSE_ERROR(201,"课程信息已经存在"),
    UNKNOW_GRADE_ERROR(300,"班级信息未知或不存在"),
    HAS_GRADE_ERROR(301,"班级已经存在"),
    UNKONW_ROLE_ERROR(600,"角色不存在"),
    HAS_ROLE_ERROR(601,"角色已经存在"),
    ;
    private Integer code;
    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }


    public String getMessage() {
        return message;
    }


}
